package com.practice.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.sql.Date;


/**
 * @author:高杰领
 * @date:2021/11/17 9:25
 * @description:Emp实体类
 * @version:1.0
 **/
public class Emp {
    private int EMPNO;
    private String ENAME;
    private String JOB;
    private int MGR;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date HIREDATE;
    private float SAL;
    private float COMM;
    private int DEPTNO;

    public Emp() {
    }

    public Emp(int EMPNO, String ENAME, String JOB, int MGR, Date HIREDATE, float SAL, float COMM, int DEPTNO) {
        this.EMPNO = EMPNO;
        this.ENAME = ENAME;
        this.JOB = JOB;
        this.MGR = MGR;
        this.HIREDATE = HIREDATE;
        this.SAL = SAL;
        this.COMM = COMM;
        this.DEPTNO = DEPTNO;
    }

    @JsonProperty("EMPNO")
    public int getEMPNO() {
        return EMPNO;
    }

    @JsonProperty("EMPNO")
    public void setEMPNO(int EMPNO) {
        this.EMPNO = EMPNO;
    }

    @JsonProperty("ENAME")
    public String getENAME() {
        return ENAME;
    }

    @JsonProperty("ENAME")
    public void setENAME(String ENAME) {
        this.ENAME = ENAME;
    }

    @JsonProperty("JOB")
    public String getJOB() {
        return JOB;
    }

    @JsonProperty("JOB")
    public void setJOB(String JOB) {
        this.JOB = JOB;
    }

    @JsonProperty("MGR")
    public int getMGR() {
        return MGR;
    }

    @JsonProperty("MGR")
    public void setMGR(int MGR) {
        this.MGR = MGR;
    }

    @JsonProperty("HIREDATE")
    public Date getHIREDATE() {
        return HIREDATE;
    }

    @JsonProperty("HIREDATE")
    public void setHIREDATE(Date HIREDATE) {
        this.HIREDATE = HIREDATE;
    }

    @JsonProperty("SAL")
    public float getSAL() {
        return SAL;
    }

    @JsonProperty("SAL")
    public void setSAL(float SAL) {
        this.SAL = SAL;
    }

    @JsonProperty("COMM")
    public float getCOMM() {
        return COMM;
    }

    @JsonProperty("COMM")
    public void setCOMM(float COMM) {
        this.COMM = COMM;
    }

    @JsonProperty("DEPTNO")
    public int getDEPTNO() {
        return DEPTNO;
    }

    @JsonProperty("DEPTNO")
    public void setDEPTNO(int DEPTNO) {
        this.DEPTNO = DEPTNO;
    }

    @Override
    public String toString() {
        return "Emp{" +
                "EMPNO=" + EMPNO +
                ", ENAME='" + ENAME + '\'' +
                ", JOB='" + JOB + '\'' +
                ", MGR=" + MGR +
                ", HIREDATE=" + HIREDATE +
                ", SAL=" + SAL +
                ", COMM=" + COMM +
                ", DEPTNO=" + DEPTNO +
                '}';
    }
}
